from Simplified_code.utils.util import *

if __name__ == '__main__':
    # Generate global index
    config_path = './config.json'
    config = load_json_file(config_path)
    print(config)

    # Get fingerprint parameter files
    param_dir = "../" + config["io"]["fp_param_dir"]
    print(param_dir)
    fp_params = [param_dir + f for f in config["io"]["fp_params"]]
    print(fp_params)

    idx_dir = get_global_index_dir(config)
    print(idx_dir)
    print("Writing global index to %s" % idx_dir)
    idx_config = {"index_folder": "../" + idx_dir,
                  "fp_param_dir": param_dir,
                  "fp_params": fp_params}
    idx_config_fname = param_dir + "global_indices.json"
    print(idx_config_fname)
